<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const arr = [
      {
        "id": 1409,
        "name": "黄陂九哥",
        "sex": "女",
        "age": 24,
        "group": 1,
        "phone": "13471323727",
        "salary": 16464,
        "truesalary": 10107,
        "province": "广东省",
        "city": "深圳市",
        "county": "罗湖区",
        "user_id": 27,
        "jing": 114.131764,
        "wei": 22.548171
      },
      {
        "id": 1410,
        "name": "毛强",
        "sex": "男",
        "age": 24,
        "group": 2,
        "phone": "17822103704",
        "salary": 6916,
        "truesalary": 6095,
        "province": "山东省",
        "city": "青岛市",
        "county": "市南区",
        "user_id": 27,
        "jing": 120.385649,
        "wei": 36.080305
      },
      {
        "id": 1411,
        "name": "周涛",
        "sex": "女",
        "age": 27,
        "group": 3,
        "phone": "13350720154",
        "salary": 19439,
        "truesalary": 11042,
        "province": "甘肃省",
        "city": "金昌市",
        "county": "永昌县",
        "user_id": 27,
        "jing": 101.984649,
        "wei": 38.24317
      },
      {
        "id": 1412,
        "name": "张明",
        "sex": "男",
        "age": 28,
        "group": 4,
        "phone": "13322489828",
        "salary": 16168,
        "truesalary": 7575,
        "province": "云南省",
        "city": "昆明市",
        "county": "安宁市",
        "user_id": 27,
        "jing": 102.478494,
        "wei": 24.919493
      },
      {
        "id": 1413,
        "name": "宋丽",
        "sex": "男",
        "age": 30,
        "group": 5,
        "phone": "13616677821",
        "salary": 13679,
        "truesalary": 15022,
        "province": "山东省",
        "city": "青岛市",
        "county": "市南区",
        "user_id": 27,
        "jing": 120.385649,
        "wei": 36.080305
      },
      {
        "id": 1414,
        "name": "范伟",
        "sex": "女",
        "age": 26,
        "group": 6,
        "phone": "13471536963",
        "salary": 6911,
        "truesalary": 16420,
        "province": "新疆维吾尔自治区",
        "city": "克拉玛依市",
        "county": "独山子区",
        "user_id": 27,
        "jing": 84.886974,
        "wei": 44.328096
      },
      {
        "id": 1415,
        "name": "邵敏",
        "sex": "男",
        "age": 24,
        "group": 7,
        "phone": "15582195768",
        "salary": 13619,
        "truesalary": 15626,
        "province": "黑龙江省",
        "city": "牡丹江市",
        "county": "东安区",
        "user_id": 27,
        "jing": 129.626642,
        "wei": 44.58136
      },
      {
        "id": 1416,
        "name": "徐秀兰",
        "sex": "男",
        "age": 29,
        "group": 8,
        "phone": "13127829602",
        "salary": 8425,
        "truesalary": 7174,
        "province": "湖南省",
        "city": "株洲市",
        "county": "芦淞区",
        "user_id": 27,
        "jing": 113.152724,
        "wei": 27.78507
      },
      {
        "id": 1417,
        "name": "白杰",
        "sex": "女",
        "age": 19,
        "group": 1,
        "phone": "15565284178",
        "salary": 9646,
        "truesalary": 13020,
        "province": "河南省",
        "city": "平顶山市",
        "county": "卫东区",
        "user_id": 27,
        "jing": 113.335193,
        "wei": 33.734707
      },
      {
        "id": 1418,
        "name": "孔静",
        "sex": "女",
        "age": 28,
        "group": 2,
        "phone": "13983779614",
        "salary": 12278,
        "truesalary": 15237,
        "province": "广东省",
        "city": "韶关市",
        "county": "浈江区",
        "user_id": 27,
        "jing": 113.611098,
        "wei": 24.804381
      },
      {
        "id": 1419,
        "name": "姚军",
        "sex": "女",
        "age": 21,
        "group": 3,
        "phone": "13945814693",
        "salary": 10168,
        "truesalary": 10410,
        "province": "新疆维吾尔自治区",
        "city": "乌鲁木齐市",
        "county": "乌鲁木齐县",
        "user_id": 27,
        "jing": 87.409417,
        "wei": 43.47136
      },
      {
        "id": 1420,
        "name": "吴洋",
        "sex": "女",
        "age": 27,
        "group": 4,
        "phone": "15507287552",
        "salary": 13277,
        "truesalary": 18254,
        "province": "广东省",
        "city": "韶关市",
        "county": "武江区",
        "user_id": 27,
        "jing": 113.587774,
        "wei": 24.792924
      },
      {
        "id": 1421,
        "name": "徐军",
        "sex": "女",
        "age": 23,
        "group": 5,
        "phone": "13221786156",
        "salary": 6969,
        "truesalary": 15272,
        "province": "广东省",
        "city": "广州市",
        "county": "荔湾区",
        "user_id": 27,
        "jing": 113.244261,
        "wei": 23.125981
      },
      {
        "id": 1422,
        "name": "康娜",
        "sex": "男",
        "age": 27,
        "group": 6,
        "phone": "15559584174",
        "salary": 11506,
        "truesalary": 12040,
        "province": "江苏省",
        "city": "宿迁市",
        "county": "宿豫区",
        "user_id": 27,
        "jing": 118.330782,
        "wei": 33.946822
      },
      {
        "id": 1423,
        "name": "史磊",
        "sex": "女",
        "age": 21,
        "group": 7,
        "phone": "13836502850",
        "salary": 17024,
        "truesalary": 14333,
        "province": "广东省",
        "city": "韶关市",
        "county": "浈江区",
        "user_id": 27,
        "jing": 113.611098,
        "wei": 24.804381
      },
      {
        "id": 1424,
        "name": "田娜",
        "sex": "男",
        "age": 26,
        "group": 8,
        "phone": "13570958131",
        "salary": 18763,
        "truesalary": 14357,
        "province": "广东省",
        "city": "广州市",
        "county": "荔湾区",
        "user_id": 27,
        "jing": 113.244261,
        "wei": 23.125981
      },
      {
        "id": 1425,
        "name": "于芳",
        "sex": "男",
        "age": 20,
        "group": 1,
        "phone": "13504441873",
        "salary": 13938,
        "truesalary": 18669,
        "province": "西藏自治区",
        "city": "昌都市",
        "county": "卡若区",
        "user_id": 27,
        "jing": 97.180437,
        "wei": 31.138507
      },
      {
        "id": 1426,
        "name": "姜超",
        "sex": "男",
        "age": 22,
        "group": 2,
        "phone": "13611980146",
        "salary": 15200,
        "truesalary": 8909,
        "province": "新疆维吾尔自治区",
        "city": "克拉玛依市",
        "county": "乌尔禾区",
        "user_id": 27,
        "jing": 85.693742,
        "wei": 46.089148
      },
      {
        "id": 1427,
        "name": "白芳",
        "sex": "女",
        "age": 21,
        "group": 3,
        "phone": "13127596389",
        "salary": 12200,
        "truesalary": 10570,
        "province": "山东省",
        "city": "青岛市",
        "county": "市南区",
        "user_id": 27,
        "jing": 120.385649,
        "wei": 36.080305
      },
      {
        "id": 1428,
        "name": "廖强",
        "sex": "男",
        "age": 22,
        "group": 4,
        "phone": "15176412288",
        "salary": 9534,
        "truesalary": 7491,
        "province": "江苏省",
        "city": "无锡市",
        "county": "锡山区",
        "user_id": 27,
        "jing": 120.357858,
        "wei": 31.589715
      },
      {
        "id": 1429,
        "name": "康军",
        "sex": "男",
        "age": 27,
        "group": 5,
        "phone": "13744171440",
        "salary": 8841,
        "truesalary": 12861,
        "province": "新疆维吾尔自治区",
        "city": "克拉玛依市",
        "county": "独山子区",
        "user_id": 27,
        "jing": 84.886974,
        "wei": 44.328096
      },
      {
        "id": 1430,
        "name": "孙明",
        "sex": "男",
        "age": 22,
        "group": 6,
        "phone": "15063526467",
        "salary": 13772,
        "truesalary": 12302,
        "province": "黑龙江省",
        "city": "七台河市",
        "county": "茄子河区",
        "user_id": 27,
        "jing": 131.068075,
        "wei": 45.785215
      },
      {
        "id": 1431,
        "name": "阎静",
        "sex": "男",
        "age": 21,
        "group": 7,
        "phone": "13788257885",
        "salary": 16510,
        "truesalary": 12399,
        "province": "黑龙江省",
        "city": "伊春市",
        "county": "铁力市",
        "user_id": 27,
        "jing": 128.032422,
        "wei": 46.98664
      },
      {
        "id": 1432,
        "name": "熊丽",
        "sex": "女",
        "age": 23,
        "group": 8,
        "phone": "13603779562",
        "salary": 15695,
        "truesalary": 15673,
        "province": "内蒙古自治区",
        "city": "呼伦贝尔市",
        "county": "海拉尔区",
        "user_id": 27,
        "jing": 119.736279,
        "wei": 49.212189
      },
      {
        "id": 1433,
        "name": "赵艳",
        "sex": "男",
        "age": 28,
        "group": 1,
        "phone": "13146686496",
        "salary": 10150,
        "truesalary": 16958,
        "province": "湖南省",
        "city": "长沙市",
        "county": "天心区",
        "user_id": 27,
        "jing": 112.989855,
        "wei": 28.112525
      },
      {
        "id": 1434,
        "name": "阎秀兰",
        "sex": "女",
        "age": 29,
        "group": 2,
        "phone": "13196142545",
        "salary": 19611,
        "truesalary": 6733,
        "province": "广西壮族自治区",
        "city": "柳州市",
        "county": "融水苗族自治县",
        "user_id": 27,
        "jing": 109.256334,
        "wei": 25.065934
      },
      {
        "id": 1435,
        "name": "廖艳",
        "sex": "男",
        "age": 18,
        "group": 3,
        "phone": "13962905164",
        "salary": 15621,
        "truesalary": 14639,
        "province": "黑龙江省",
        "city": "七台河市",
        "county": "茄子河区",
        "user_id": 27,
        "jing": 131.068075,
        "wei": 45.785215
      },
      {
        "id": 1436,
        "name": "赖涛",
        "sex": "男",
        "age": 28,
        "group": 4,
        "phone": "13570674482",
        "salary": 10682,
        "truesalary": 6232,
        "province": "内蒙古自治区",
        "city": "包头市",
        "county": "东河区",
        "user_id": 27,
        "jing": 110.044142,
        "wei": 40.575948
      },
      {
        "id": 1437,
        "name": "汤桂英",
        "sex": "女",
        "age": 21,
        "group": 5,
        "phone": "13728838829",
        "salary": 9302,
        "truesalary": 18098,
        "province": "江苏省",
        "city": "无锡市",
        "county": "锡山区",
        "user_id": 27,
        "jing": 120.357858,
        "wei": 31.589715
      },
      {
        "id": 1438,
        "name": "董伟",
        "sex": "女",
        "age": 25,
        "group": 6,
        "phone": "13356341710",
        "salary": 8977,
        "truesalary": 10741,
        "province": "广东省",
        "city": "韶关市",
        "county": "浈江区",
        "user_id": 27,
        "jing": 113.611098,
        "wei": 24.804381
      },
      {
        "id": 1439,
        "name": "常磊",
        "sex": "男",
        "age": 24,
        "group": 7,
        "phone": "13275476715",
        "salary": 6376,
        "truesalary": 15316,
        "province": "黑龙江省",
        "city": "牡丹江市",
        "county": "东安区",
        "user_id": 27,
        "jing": 129.626642,
        "wei": 44.58136
      },
      {
        "id": 1440,
        "name": "锺芳",
        "sex": "女",
        "age": 21,
        "group": 8,
        "phone": "17868411821",
        "salary": 12760,
        "truesalary": 13132,
        "province": "西藏自治区",
        "city": "日喀则市",
        "county": "南木林县",
        "user_id": 27,
        "jing": 89.099243,
        "wei": 29.682331
      },
      {
        "id": 1441,
        "name": "郭勇",
        "sex": "男",
        "age": 27,
        "group": 1,
        "phone": "15597412759",
        "salary": 13246,
        "truesalary": 14112,
        "province": "云南省",
        "city": "玉溪市",
        "county": "元江哈尼族彝族傣族自治县",
        "user_id": 27,
        "jing": 101.998103,
        "wei": 23.596503
      },
      {
        "id": 1442,
        "name": "曹超",
        "sex": "男",
        "age": 27,
        "group": 2,
        "phone": "13966841374",
        "salary": 12825,
        "truesalary": 6403,
        "province": "云南省",
        "city": "曲靖市",
        "county": "宣威市",
        "user_id": 27,
        "jing": 104.104497,
        "wei": 26.219759
      },
      {
        "id": 1443,
        "name": "万娜",
        "sex": "男",
        "age": 25,
        "group": 3,
        "phone": "13724424230",
        "salary": 12024,
        "truesalary": 18920,
        "province": "云南省",
        "city": "玉溪市",
        "county": "新平彝族傣族自治县",
        "user_id": 27,
        "jing": 101.990157,
        "wei": 24.070051
      },
      {
        "id": 1444,
        "name": "赵平",
        "sex": "男",
        "age": 20,
        "group": 4,
        "phone": "13074778541",
        "salary": 19807,
        "truesalary": 16032,
        "province": "内蒙古自治区",
        "city": "呼伦贝尔市",
        "county": "海拉尔区",
        "user_id": 27,
        "jing": 119.736279,
        "wei": 49.212189
      },
      {
        "id": 1445,
        "name": "熊平",
        "sex": "男",
        "age": 27,
        "group": 5,
        "phone": "13824736976",
        "salary": 17580,
        "truesalary": 18425,
        "province": "内蒙古自治区",
        "city": "阿拉善盟",
        "county": "额济纳旗",
        "user_id": 27,
        "jing": 101.05559,
        "wei": 41.954347
      },
      {
        "id": 1446,
        "name": "黎艳",
        "sex": "女",
        "age": 23,
        "group": 6,
        "phone": "13444188425",
        "salary": 9066,
        "truesalary": 6394,
        "province": "广西壮族自治区",
        "city": "桂林市",
        "county": "资源县",
        "user_id": 27,
        "jing": 110.6527,
        "wei": 26.042443
      },
      {
        "id": 1447,
        "name": "卢芳",
        "sex": "女",
        "age": 20,
        "group": 7,
        "phone": "13352448031",
        "salary": 11670,
        "truesalary": 7718,
        "province": "黑龙江省",
        "city": "哈尔滨市",
        "county": "道里区",
        "user_id": 27,
        "jing": 126.616957,
        "wei": 45.755777
      },
      {
        "id": 1448,
        "name": "董平",
        "sex": "男",
        "age": 19,
        "group": 8,
        "phone": "13351005323",
        "salary": 10195,
        "truesalary": 8491,
        "province": "西藏自治区",
        "city": "日喀则市",
        "county": "桑珠孜区",
        "user_id": 27,
        "jing": 88.88727,
        "wei": 29.270389
      },
      {
        "id": 1449,
        "name": "丁静",
        "sex": "男",
        "age": 21,
        "group": 1,
        "phone": "13784140019",
        "salary": 6268,
        "truesalary": 18730,
        "province": "广西壮族自治区",
        "city": "南宁市",
        "county": "兴宁区",
        "user_id": 27,
        "jing": 108.368871,
        "wei": 22.854021
      },
      {
        "id": 1450,
        "name": "高娜",
        "sex": "男",
        "age": 28,
        "group": 2,
        "phone": "13522818543",
        "salary": 12662,
        "truesalary": 14147,
        "province": "广东省",
        "city": "韶关市",
        "county": "浈江区",
        "user_id": 27,
        "jing": 113.611098,
        "wei": 24.804381
      },
      {
        "id": 1451,
        "name": "姚敏",
        "sex": "女",
        "age": 26,
        "group": 3,
        "phone": "13613052827",
        "salary": 15229,
        "truesalary": 16798,
        "province": "黑龙江省",
        "city": "伊春市",
        "county": "铁力市",
        "user_id": 27,
        "jing": 128.032422,
        "wei": 46.98664
      },
      {
        "id": 1452,
        "name": "萧磊",
        "sex": "女",
        "age": 28,
        "group": 4,
        "phone": "13333976741",
        "salary": 8754,
        "truesalary": 16401,
        "province": "湖南省",
        "city": "株洲市",
        "county": "芦淞区",
        "user_id": 27,
        "jing": 113.152724,
        "wei": 27.78507
      },
      {
        "id": 1453,
        "name": "锺秀英",
        "sex": "男",
        "age": 30,
        "group": 5,
        "phone": "13897645448",
        "salary": 7438,
        "truesalary": 6809,
        "province": "西藏自治区",
        "city": "日喀则市",
        "county": "南木林县",
        "user_id": 27,
        "jing": 89.099243,
        "wei": 29.682331
      },
      {
        "id": 1454,
        "name": "白明",
        "sex": "男",
        "age": 28,
        "group": 6,
        "phone": "13276122210",
        "salary": 6952,
        "truesalary": 11406,
        "province": "河南省",
        "city": "开封市",
        "county": "顺河回族区",
        "user_id": 27,
        "jing": 114.364875,
        "wei": 34.800459
      },
      {
        "id": 1455,
        "name": "陈涛",
        "sex": "男",
        "age": 26,
        "group": 7,
        "phone": "13323242520",
        "salary": 12626,
        "truesalary": 10147,
        "province": "湖南省",
        "city": "株洲市",
        "county": "芦淞区",
        "user_id": 27,
        "jing": 113.152724,
        "wei": 27.78507
      },
      {
        "id": 1456,
        "name": "武平",
        "sex": "男",
        "age": 22,
        "group": 8,
        "phone": "13392558261",
        "salary": 11401,
        "truesalary": 12973,
        "province": "湖南省",
        "city": "株洲市",
        "county": "荷塘区",
        "user_id": 27,
        "jing": 113.173487,
        "wei": 27.855929
      },
      {
        "id": 1457,
        "name": "姜敏",
        "sex": "女",
        "age": 19,
        "group": 1,
        "phone": "15058881473",
        "salary": 19351,
        "truesalary": 18529,
        "province": "江苏省",
        "city": "宿迁市",
        "county": "宿豫区",
        "user_id": 27,
        "jing": 118.330782,
        "wei": 33.946822
      },
      {
        "id": 1458,
        "name": "张平",
        "sex": "女",
        "age": 29,
        "group": 2,
        "phone": "15159530417",
        "salary": 8841,
        "truesalary": 9309,
        "province": "云南省",
        "city": "昆明市",
        "county": "安宁市",
        "user_id": 27,
        "jing": 102.478494,
        "wei": 24.919493
      },
      {
        "id": 1459,
        "name": "唐静",
        "sex": "女",
        "age": 24,
        "group": 3,
        "phone": "13737131428",
        "salary": 7867,
        "truesalary": 18740,
        "province": "山东省",
        "city": "青岛市",
        "county": "市南区",
        "user_id": 27,
        "jing": 120.385649,
        "wei": 36.080305
      },
      {
        "id": 1460,
        "name": "龙军",
        "sex": "男",
        "age": 20,
        "group": 4,
        "phone": "13197587648",
        "salary": 14294,
        "truesalary": 8132,
        "province": "江苏省",
        "city": "宿迁市",
        "county": "宿城区",
        "user_id": 27,
        "jing": 118.242534,
        "wei": 33.963029
      },
      {
        "id": 1461,
        "name": "万平",
        "sex": "男",
        "age": 22,
        "group": 5,
        "phone": "15111752136",
        "salary": 8428,
        "truesalary": 6622,
        "province": "山东省",
        "city": "青岛市",
        "county": "市北区",
        "user_id": 27,
        "jing": 120.374731,
        "wei": 36.087609
      },
      {
        "id": 1462,
        "name": "卢霞",
        "sex": "男",
        "age": 18,
        "group": 6,
        "phone": "13478505530",
        "salary": 15979,
        "truesalary": 10042,
        "province": "西藏自治区",
        "city": "昌都市",
        "county": "卡若区",
        "user_id": 27,
        "jing": 97.180437,
        "wei": 31.138507
      },
      {
        "id": 1463,
        "name": "傅洋",
        "sex": "女",
        "age": 26,
        "group": 7,
        "phone": "13134847231",
        "salary": 19268,
        "truesalary": 9336,
        "province": "河南省",
        "city": "开封市",
        "county": "龙亭区",
        "user_id": 27,
        "jing": 114.35473,
        "wei": 34.815784
      },
      {
        "id": 1464,
        "name": "谢芳",
        "sex": "男",
        "age": 28,
        "group": 8,
        "phone": "15154852284",
        "salary": 13143,
        "truesalary": 19920,
        "province": "山东省",
        "city": "济南市",
        "county": "市中区",
        "user_id": 27,
        "jing": 116.997777,
        "wei": 36.651474
      }
    ]


    // 空数组
    // 数组 indexOf() 数组里面如果是简单类型 
    // 数组 findIndex() 数组里面的是 对象
    const newArr = []

    // 遍历数组
    arr.forEach(item => {
      // 看看 item.province 在 newArr 里面的对象的 name属性 是否存在
      const index = newArr.findIndex(val => val.name === item.province)
      if (index === -1) {
        newArr.push({
          name: item.province,
          value: 1
        })
      } else {
        newArr[index].value++
      }
    })

    console.log(newArr)





  </script>
</body>

</html>